<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>CSS Exclusions Module Level 1</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="exploring" name="csswg-work-status">
  <meta content="ED" name="w3c-status">
  <meta content="CSS Exclusions define arbitrary areas around which inline content ([[!CSS21]]) can flow. CSS Exclusions can be defined on any CSS block-level elements. CSS Exclusions extend the notion of content wrapping previously limited to floats." name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
  body {
    background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat;
  }
  </style>
  <link href="https://www.w3.org/TR/css3-exclusions/" rel="canonical">
<script defer src="https://test.csswg.org/harness/annotate.js#!css-exclusions-1_dev/css-exclusions-1" type="text/javascript"></script>
<style type="text/css">
  .singleImgExample {
    display: block;
    margin: auto;
  }

  .example-table {
    table-layout: fixed;
    width: 100%;
  }

  .example-table tr td img {
    width: 90%;
  }
</style>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">CSS Exclusions Module Level 1</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <details>
    <summary>Specification Metadata</summary>
    <div data-fill-with="spec-metadata">
     <dl>
      <dt>This version:
      <dd><a class="u-url" href="https://drafts.csswg.org/css-exclusions/">https://drafts.csswg.org/css-exclusions/</a>
      <dt>Latest published version:
      <dd><a href="https://www.w3.org/TR/css3-exclusions/">https://www.w3.org/TR/css3-exclusions/</a>
      <dt>Previous Versions:
      <dd><a href="https://www.w3.org/TR/2015/WD-css3-exclusions-20150115/" rel="prev">https://www.w3.org/TR/2015/WD-css3-exclusions-20150115/</a>
      <dd><a href="https://www.w3.org/TR/2013/WD-css3-exclusions-20130528/" rel="prev">https://www.w3.org/TR/2013/WD-css3-exclusions-20130528/</a>
      <dt>Test Suites:
      <dd><a href="http://test.csswg.org/suites/css-exclusions-1_dev/nightly-unstable/">http://test.csswg.org/suites/css-exclusions-1_dev/nightly-unstable/</a>
      <dd><a href="http://test.csswg.org/suites/css3-exclusions/nightly-unstable/">http://test.csswg.org/suites/css3-exclusions/nightly-unstable/</a>
      <dt class="editor">Editors:
      <dd class="editor p-author h-card vcard" data-editor-id="49885"><a class="p-name fn u-email email" href="mailto:ratan@microsoft.com">Rossen Atanassov</a> (<span class="p-org org">Microsoft</span>)
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:vhardy@adobe.com">Vincent Hardy</a> (<span class="p-org org">Adobe</span>)
      <dd class="editor p-author h-card vcard" data-editor-id="46659"><a class="p-name fn u-email email" href="mailto:astearns@adobe.com">Alan Stearns</a> (<span class="p-org org">Adobe</span>)
      <dt>Suggest an Edit for this Spec:
      <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/css-exclusions-1/Overview.bs">GitHub Editor</a>
      <dt>Issue Tracking:
      <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-exclusions-1">GitHub Issues</a>
      <dt>Issues list:
      <dd><a href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;product=CSS&amp;component=Exclusions&amp;resolution=---&amp;cmdtype=doit">in Bugzilla</a>
     </dl>
    </div>
   </details>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>CSS Exclusions define arbitrary areas around which inline content (<a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>) can flow. CSS Exclusions can be defined on any CSS block-level elements. CSS Exclusions extend the notion of content wrapping previously limited to floats.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This is a public copy of the editors’ draft.
	It is provided for discussion only and may change at any moment.
	Its publication here does not imply endorsement of its contents by W3C.
	Don’t cite this document other than as work in progress. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “css-exclusions” in the title,
	preferably like this:
	“[css-exclusions] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a>. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#intro"><span class="secno">1</span> <span class="content"> Introduction</span></a>
    <li><a href="#terms"><span class="secno">2</span> <span class="content"> Terminology</span></a>
    <li>
     <a href="#exclusions"><span class="secno">3</span> <span class="content"> Exclusions</span></a>
     <ol class="toc">
      <li>
       <a href="#declaring-exclusions"><span class="secno">3.1</span> <span class="content"> Declaring exclusions</span></a>
       <ol class="toc">
        <li><a href="#wrap-flow-property"><span class="secno">3.1.1</span> <span class="content"> The <span class="property">wrap-flow</span> property</span></a>
       </ol>
      <li><a href="#scope-and-effect-of-exclusions"><span class="secno">3.2</span> <span class="content"> Scope and effect of exclusions</span></a>
      <li>
       <a href="#propagation-of-exclusions"><span class="secno">3.3</span> <span class="content"> Propagation of Exclusions</span></a>
       <ol class="toc">
        <li><a href="#wrap-through-property"><span class="secno">3.3.1</span> <span class="content"> The <span class="property">wrap-through</span> Property</span></a>
       </ol>
      <li><a href="#exclusions-order"><span class="secno">3.4</span> <span class="content"> Exclusions order</span></a>
      <li>
       <a href="#exclusions-processing-model"><span class="secno">3.5</span> <span class="content"> Processing model</span></a>
       <ol class="toc">
        <li><a href="#exclusions-processing-model-description"><span class="secno">3.5.1</span> <span class="content"> Description</span></a>
        <li><a href="#step-1"><span class="secno">3.5.2</span> <span class="content"> Step 1: resolve exclusion boxes belonging to each <span>wrapping context</span></span></a>
        <li><a href="#step-2"><span class="secno">3.5.3</span> <span class="content"> Step 2: resolve wrapping contexts and lay out containing blocks</span></a>
        <li><a href="#step-2-A"><span class="secno">3.5.4</span> <span class="content"> Step 2-A: resolve the position and size of exclusion boxes</span></a>
        <li><a href="#step-2-B"><span class="secno">3.5.5</span> <span class="content"> Step 2-B: lay out containing block applying wrapping</span></a>
        <li>
         <a href="#processing-model-example"><span class="secno">3.5.6</span> <span class="content"> Processing Model Example</span></a>
         <ol class="toc">
          <li><a href="#example-step-1"><span class="secno">3.5.6.1</span> <span class="content"> Step 1: resolve exclusion boxes belonging to each <span>wrapping context</span></span></a>
          <li>
           <a href="#example-step-2"><span class="secno">3.5.6.2</span> <span class="content"> Step 2: resolve wrapping contexts and lay out containing blocks</span></a>
           <ol class="toc">
            <li><a href="#example-resolving-rwc-1"><span class="secno">3.5.6.2.1</span> <span class="content"> Resolving RWC-1</span></a>
            <li><a href="#example-resolving-rwc-2"><span class="secno">3.5.6.2.2</span> <span class="content"> Resolving RWC-2</span></a>
           </ol>
         </ol>
       </ol>
      <li>
       <a href="#floats-and-exclusions"><span class="secno">3.6</span> <span class="content"> Floats and exclusions</span></a>
       <ol class="toc">
        <li><a href="#floats-and-exclusions-similarities"><span class="secno">3.6.1</span> <span class="content"> Similarities</span></a>
        <li><a href="#floats-and-exclusions-differences"><span class="secno">3.6.2</span> <span class="content"> Differences</span></a>
        <li>
         <a href="#floats-interop"><span class="secno">3.6.3</span> <span class="content"> Interoperability</span></a>
         <ol class="toc">
          <li><a href="#effect-of-floats-on-exclusions"><span class="secno">3.6.3.1</span> <span class="content"> Effect of floats on exclusions</span></a>
          <li><a href="#effect-of-exclusions-on-floats"><span class="secno">3.6.3.2</span> <span class="content"> Effect of exclusions on floats</span></a>
         </ol>
       </ol>
     </ol>
    <li><a href="#acks"><span class="secno"></span> <span class="content"> Acknowledgments</span></a>
    <li>
     <a href="#changes"><span class="secno"></span> <span class="content">Changes</span></a>
     <ol class="toc">
      <li><a href="#recent-changes"><span class="secno"></span> <span class="content"> Changes from the <span>15 January 2015 Working Draft</span></span></a>
      <li><a href="#changes-2013"><span class="secno"></span> <span class="content"> Changes from the <span>28 May 2013 Working Draft</span></span></a>
      <li><a href="#changes-2012"><span class="secno"></span> <span class="content"> Changes from the <span>3 May 2012 Working Draft</span></span></a>
     </ol>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
    <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content"> Introduction</span><a class="self-link" href="#intro"></a></h2>
   <p><em>This section is not normative.</em></p>
   <p>This specification defines features that allow inline flow
  content to wrap around outside the <span>exclusion area</span> of elements.</p>
   <h2 class="heading settled" data-level="2" id="terms"><span class="secno">2. </span><span class="content"> Terminology</span><a class="self-link" href="#terms"></a></h2>
   <dl>
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="exclusion-box">Exclusion box</dfn> 
    <dd> A <a href="https://www.w3.org/TR/css3-box/">box</a> (<a data-link-type="biblio" href="#biblio-css3box">[CSS3BOX]</a>) that defines
      an <span>exclusion area</span> for other boxes. The <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow">wrap-flow</a> property is
      used to make an element’s generated box an exclusion box. An exclusion box
      contributes its <span>exclusion area</span> to its <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">containing block’s</a> <span>wrapping context</span>. An element with a <span class="css">float</span> computed value other
      than <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-page-floats-3/#valdef-float-none" id="ref-for-valdef-float-none">none</a> does not become an exclusion. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="exclusion-area">Exclusion area</dfn> 
    <dd>
      The area used for excluding inline flow content around an exclusion box. The <span>exclusion area</span> is equivalent to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-3/#border-box" id="ref-for-border-box">border box</a> for an exclusion box. 
     <p class="note" role="note"> If a user agent implements both CSS Exclusions and CSS Shapes, the
        shape-outside property defines the exclusion area instead of the border box. </p>
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="exclusion-element">Exclusion element</dfn> 
    <dd> An <span>exclusion element</span> is a block-level element which is not a float
      and generates an <span>exclusion box</span>. An element generates an exclusion
      box when its <span class="css">wrap-flow</span> property’s computed value is not <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-auto" id="ref-for-valdef-wrap-flow-auto">auto</a>. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="wrapping-context">Wrapping context</dfn> 
    <dd>
      The <span>wrapping context</span> of a box is a collection of <span>exclusion
      areas</span> contributed by its associated <span>exclusion boxes</span>.
      During layout, a box wraps its inline flow content in the <code>wrapping area</code> that corresponds to the subtraction of its <span>wrapping context</span> from
      its own <span>content area</span>. 
     <p>A box inherits its <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">containing block’s</a> <span>wrapping context</span> unless it specifically
      resets it using the <a class="property" data-link-type="propdesc" href="#propdef-wrap-through" id="ref-for-propdef-wrap-through">wrap-through</a> property.</p>
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="content-area">Content area</dfn> 
    <dd> The <a data-link-type="dfn" href="#content-area" id="ref-for-content-area">content area</a> is normally used for layout of the inline flow content of a box. 
    <dt><dfn data-dfn-type="dfn" data-export id="wrapping-area">Wrapping area<a class="self-link" href="#wrapping-area"></a></dfn> 
    <dd> The area used for layout of inline flow content of a box affected by a <span>wrapping context</span>, defined by subtracting the <span>wrapping
      context</span> from its <span>content area</span>. 
    <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="outside">Outside</dfn> and <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="inside">inside</dfn> 
    <dd> In this specification, <a data-link-type="dfn" href="#outside" id="ref-for-outside">outside</a> refers to DOM content that is not a descendant
      of an element while <a data-link-type="dfn" href="#inside" id="ref-for-inside">inside</a> refers to the element’s descendants. 
   </dl>
   <h2 class="heading settled" data-level="3" id="exclusions"><span class="secno">3. </span><span class="content"> Exclusions</span><a class="self-link" href="#exclusions"></a></h2>
   <p>Exclusion elements define <span>exclusion areas</span> that contribute to their
  containing block’s <span>wrapping context</span>. As a consequence, exclusions
  impact the layout of their containing block’s descendants.</p>
   <p>Elements lay out their inline content in their <span>content area</span> and wrap
  around the <span>exclusion areas</span> in their associated <span>wrapping
  context</span>. If the element is itself an exclusion, it does not wrap around
  its own exclusion area and the impact of other exclusions on other exclusions
  is controlled by the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-position-3/#propdef-z-index" id="ref-for-propdef-z-index">z-index</a> property as explained in the
  'exclusions order' section.</p>
   <h3 class="heading settled" data-level="3.1" id="declaring-exclusions"><span class="secno">3.1. </span><span class="content"> Declaring exclusions</span><a class="self-link" href="#declaring-exclusions"></a></h3>
   <p>An element becomes an exclusion when its <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow①">wrap-flow</a> property has a computed
  value other than <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-auto" id="ref-for-valdef-wrap-flow-auto①">auto</a>.</p>
   <h4 class="heading settled" data-level="3.1.1" id="wrap-flow-property"><span class="secno">3.1.1. </span><span class="content"> The <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow②">wrap-flow</a> property</span><a class="self-link" href="#wrap-flow-property"></a></h4>
   <table class="def propdef" data-link-for-hint="wrap-flow">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-wrap-flow">wrap-flow</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> both <span id="ref-for-comb-one①">|</span> start <span id="ref-for-comb-one②">|</span> end <span id="ref-for-comb-one③">|</span> minimum <span id="ref-for-comb-one④">|</span> maximum <span id="ref-for-comb-one⑤">|</span> clear 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>auto 
     <tr>
      <th>Applies to:
      <td>block-level elements. 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>N/A 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>as specified except for element’s whose <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visuren.html#propdef-float" id="ref-for-propdef-float">float</a> computed value is not <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-page-floats-3/#valdef-float-none" id="ref-for-valdef-float-none①">none</a>, in which case the computed value is <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-auto" id="ref-for-valdef-wrap-flow-auto②">auto</a>. 
     <tr>
      <th>Canonical order:
      <td>per grammar 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete 
   </table>
   <p>The values of this property have the following meanings:</p>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-flow" data-dfn-type="value" data-export id="valdef-wrap-flow-auto">auto</dfn> 
    <dd> No exclusion is created. Inline flow content interacts with the element
        as usual. In particular, if the element is a <a href="https://www.w3.org/TR/CSS2/visuren.html#floats">float</a> (see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>), the behavior is unchanged. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-flow" data-dfn-type="value" data-export id="valdef-wrap-flow-both">both</dfn> 
    <dd> Inline flow content can flow on all sides of the exclusion. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-flow" data-dfn-type="value" data-export id="valdef-wrap-flow-start">start</dfn> 
    <dd> Inline flow content can flow around the start edge of the <span>exclusion
        area</span> but must leave the area next to the end edge of the exclusion
        empty. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-flow" data-dfn-type="value" data-export id="valdef-wrap-flow-end">end</dfn> 
    <dd> Inline flow content can flow around the end edge of the <span>exclusion area</span> but must leave the area next to the start edge
        of the exclusion empty. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-flow" data-dfn-type="value" data-export id="valdef-wrap-flow-minimum">minimum</dfn> 
    <dd> Inline flow content can flow around the edge of the exclusion with the
        smallest available space within the flow content’s containing block, and
        must leave the other edge of the exclusion empty. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-flow" data-dfn-type="value" data-export id="valdef-wrap-flow-maximum">maximum</dfn> 
    <dd> Inline flow content can flow around the edge of the exclusion with the
        largest available space within the flow content’s containing block, and
        must leave the other edge of the exclusion empty. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-flow" data-dfn-type="value" data-export id="valdef-wrap-flow-clear">clear</dfn> 
    <dd> Inline flow content can only flow before and after the exclusion in the
        flow content’s block direction and must leave the areas next to the start
        and end edges of the exclusion empty. 
   </dl>
   <p>If the property’s computed value is <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-auto" id="ref-for-valdef-wrap-flow-auto③">auto</a>, the element does not become an <span>exclusion</span>.</p>
   <p>Otherwise, a computed <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow③">wrap-flow</a> property value of <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-both" id="ref-for-valdef-wrap-flow-both">both</a>, <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-start" id="ref-for-valdef-wrap-flow-start">start</a>, <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-end" id="ref-for-valdef-wrap-flow-end">end</a>, <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-minimum" id="ref-for-valdef-wrap-flow-minimum">minimum</a>, <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-maximum" id="ref-for-valdef-wrap-flow-maximum">maximum</a> or <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-clear" id="ref-for-valdef-wrap-flow-clear">clear</a> on an  element makes that element an <a data-link-type="dfn" href="#exclusion-element" id="ref-for-exclusion-element">exclusion element</a>. It’s <a data-link-type="dfn" href="#exclusion-area" id="ref-for-exclusion-area">exclusion area</a> is contributed
  to its containing block’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context">wrapping context</a>, causing the containing
  block’s descendants to wrap around its <span id="ref-for-exclusion-area①">exclusion area</span>.</p>
   <div class="figure">
     <img alt="LTR text wrapping on left edge, RTL text wrapping on right edge, and vertical text wrapping on top edge." src="images/exclusion-writing-modes.png" width="70%"> 
    <p class="caption">Exclusion with <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow④">wrap-flow</a>: <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-start" id="ref-for-valdef-wrap-flow-start①">start</a> interacting with various
    writing modes.</p>
   </div>
   <p>Determining the relevant edges of the exclusion depends on the <a href="https://www.w3.org/TR/css3-writing-modes/#text-flow">writing mode</a> <a data-link-type="biblio" href="#biblio-css3-writing-modes">[CSS3-WRITING-MODES]</a> of the content wrapping around the 'exclusion area'.</p>
   <p>An <a data-link-type="dfn" href="#exclusion-element" id="ref-for-exclusion-element①">exclusion element</a> establishes a new <a href>block formatting
  context</a> (see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>) for its content.</p>
   <div class="figure">
     <img alt="General illustration showing how exclusions combine" src="images/exclusions-illustration.png" width="70%"> 
    <p class="caption">Combining exclusions</p>
   </div>
   <p>The above figure illustrates how exclusions are combined. The outermost box
  represents an element’s content box. The A, B, C and D darker gray boxes
  represent exclusions in the element’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①">wrapping context</a>.
  A, B, C and D have their respective <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow⑤">wrap-flow</a> computed to <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-both" id="ref-for-valdef-wrap-flow-both①">both</a>, <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-start" id="ref-for-valdef-wrap-flow-start②">start</a>, <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-end" id="ref-for-valdef-wrap-flow-end①">end</a> and <a class="css" data-link-type="maybe" href="#valdef-wrap-flow-clear" id="ref-for-valdef-wrap-flow-clear①">clear</a> respectively. The lighter gray areas show the additional areas
  that are excluded for inline layout as a result of the 'wrap-flow’value.
  For example, the area to the right of B cannot be used for inline layout
  of left-to-right writing mode content because the <span class="property" id="ref-for-propdef-wrap-flow⑥">wrap-flow</span> for B is <span class="css" id="ref-for-valdef-wrap-flow-start③">start</span>.</p>
   <p>The background blue area shows what areas are available for a left-to-right
  writing mode element’s inline content layout.
  All areas represented with a light or dark shade of gray are not available for
  (left-to-right writing mode) inline content layout.</p>
   <div class="example" id="example-9c1936a4">
    <a class="self-link" href="#example-9c1936a4"></a> The <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow⑦">wrap-flow</a> property values applied to exclusions as grid items. 
<pre>&lt;div id="grid">
    &lt;div id="top-right" class="exclusion">&lt;/div>
    &lt;div id="bottom-left" class="exclusion">&lt;/div>
    &lt;div id="content">Lorem ipsum…&lt;/div>
&lt;/div>

&lt;style type="text/css">
#grid {
    width: 30em;
    height: 30em;
    display: grid;
    grid-columns: 25% 25% 25% 25%;
    grid-rows: 25% 25% 25% 25%;

#top-right {
    grid-column: 3;
    grid-row: 2;
}

#bottom-left {
    grid-column: 2;
    grid-row: 3;
}

.exclusion {
    wrap-flow: &lt;see below>
}

#content {
    grid-row: 1;
    grid-row-span: 4;
    grid-column: 1;
    grid-column-span: 4;
}
&lt;/style>
</pre>
    <p>The following figures illustrate the visual rendering for different values
  of the <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow⑧">wrap-flow</a> property. The gray grid lines are marking the grid cells
  and the blue area is the exclusion box (positioned by the grid).</p>
    <table class="example-table">
     <tbody>
      <tr>
       <td><code class="html">.exclusion{ wrap-flow: auto; }</code>
       <td><code class="html">.exclusion{ wrap-flow: both; }</code>
      <tr>
       <td><img alt="Example rendering for wrap-side: auto" src="images/exclusion_wrap_side_auto.png">
       <td><img alt="Example rendering for wrap-side: both" src="images/exclusion_wrap_side_both.png">
      <tr>
       <td><code class="html">.exclusion{ wrap-flow: start; }</code>
       <td><code class="html">.exclusion{ wrap-flow: end; }</code>
      <tr>
       <td><img alt="Example rendering for wrap-side: start" src="images/exclusion_wrap_side_left.png">
       <td><img alt="Example rendering for wrap-side: end" src="images/exclusion_wrap_side_right.png">
      <tr>
       <td><code class="html">.exclusion{ wrap-flow: minimum; }</code>
       <td><code class="html">.exclusion{ wrap-flow: maximum; }</code>
      <tr>
       <td><img alt="Example rendering for wrap-side: minimum" src="images/exclusion_wrap_side_minimum.png">
       <td><img alt="Example rendering for wrap-side: maximum" src="images/exclusion_wrap_side_maximum.png">
      <tr>
       <td><code class="html">.exclusion{ wrap-flow: clear; }</code>
       <td>
      <tr>
       <td><img alt="Example rendering for wrap-side: clear" src="images/exclusion_wrap_side_clear.png">
       <td>
    </table>
   </div>
   <h3 class="heading settled" data-level="3.2" id="scope-and-effect-of-exclusions"><span class="secno">3.2. </span><span class="content"> Scope and effect of exclusions</span><a class="self-link" href="#scope-and-effect-of-exclusions"></a></h3>
   <p>An <span>exclusion</span> affects the inline flow content descended from the
  exclusion’s containing block (defined in <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">CSS 2.1 10.1</a>) and that of all descendant
  elements of the same containing block. All inline flow content inside the
  containing block of the exclusions is affected. To stop the effect of exclusions
  defined outside an element, the <a class="property" data-link-type="propdesc" href="#propdef-wrap-through" id="ref-for-propdef-wrap-through①">wrap-through</a> property can be used
  (see the <a href="#propagation-of-exclusions">propagation of exclusions</a> section below).</p>
   <p>As a reminder, for exclusions with <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-position-3/#propdef-position" id="ref-for-propdef-position">position</a>:<a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-position-3/#valdef-position-fixed" id="ref-for-valdef-position-fixed">fixed</a>, the containing block
  is established by the root element.</p>
   <h3 class="heading settled" data-level="3.3" id="propagation-of-exclusions"><span class="secno">3.3. </span><span class="content"> Propagation of Exclusions</span><a class="self-link" href="#propagation-of-exclusions"></a></h3>
   <p>By default, an element inherits its parent <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②">wrapping context</a>. In other
  words it is subject to the exclusions defined <a data-link-type="dfn" href="#outside" id="ref-for-outside①">outside</a> the element.</p>
   <p>Setting the <a class="property" data-link-type="propdesc" href="#propdef-wrap-through" id="ref-for-propdef-wrap-through②">wrap-through</a> property to <a class="css" data-link-type="maybe" href="#valdef-wrap-through-none" id="ref-for-valdef-wrap-through-none">none</a> prevents an
  element from inheriting its parent <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context③">wrapping context</a>. In other words,
  exclusions defined <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-lists-3/#list-style-position-outside" id="ref-for-list-style-position-outside">outside</a> the element, have not effect on the element’s
  children layout.</p>
   <p class="note" role="note"> Exclusions defined by an element’s descendants still contribute to their
    containing block’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context④">wrapping context</a>. If that containing block is a
    child of an element with <a class="property" data-link-type="propdesc" href="#propdef-wrap-through" id="ref-for-propdef-wrap-through③">wrap-through</a> computes to <a class="css" data-link-type="maybe" href="#valdef-wrap-through-none" id="ref-for-valdef-wrap-through-none①">none</a>,
    or the element itself, then exclusion still have an effect on the children
    of that containing block element. </p>
   <h4 class="heading settled" data-level="3.3.1" id="wrap-through-property"><span class="secno">3.3.1. </span><span class="content"> The <a class="property" data-link-type="propdesc" href="#propdef-wrap-through" id="ref-for-propdef-wrap-through④">wrap-through</a> Property</span><a class="self-link" href="#wrap-through-property"></a></h4>
   <table class="def propdef" data-link-for-hint="wrap-through">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-wrap-through">wrap-through</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">wrap <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥">|</a> none
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>wrap
     <tr>
      <th>Applies to:
      <td>block-level elements
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>N/A
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>as specified
     <tr>
      <th>Canonical order:
      <td>per grammar
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete
   </table>
   <p>The values of this property have the following meanings:</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="wrap-through" data-dfn-type="value" data-export id="valdef-wrap-through-wrap">wrap<a class="self-link" href="#valdef-wrap-through-wrap"></a></dfn>
    <dd> The element inherits its parent node’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context⑤">wrapping context</a>. Its descendant
    inline content wraps around exclusions defined <a data-link-type="dfn" href="#outside" id="ref-for-outside②">outside</a> the element. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="wrap-through" data-dfn-type="value" data-export id="valdef-wrap-through-none">none</dfn>
    <dd> The element does not inherit its parent node’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context⑥">wrapping context</a>. Its
    descendants are only subject to exclusion areas defined <a data-link-type="dfn" href="#inside" id="ref-for-inside①">inside</a> the element. 
   </dl>
   <div class="example" id="example-50273d4a">
    <a class="self-link" href="#example-50273d4a"></a> Using the <a class="property" data-link-type="propdesc" href="#propdef-wrap-through" id="ref-for-propdef-wrap-through⑤">wrap-through</a> property to control the effect of exclusions. 
<pre><code class="html">
&lt;style type="text/css">
    #grid {
        display: grid;
        grid-columns: 25% 50% 25%;
        grid-rows: 25% 25% 25% 25%;
    }

    #exclusion {
        grid-row: 2;
        grid-row-span: 2;
        grid-column: 2;
        wrap-flow: &lt;see below>
    }

    #rowA, #rowB {
        grid-row-span: 2;
        grid-column: 1;
        grid-column-span: 3;
    }

    #rowA {
        grid-row: 1;
    }

    #rowB {
        grid-row: 3;
    }
    &lt;/style>

&lt;style type="text/css">
    .exclusion  {
      wrap-flow: both;
      position: absolute;
      left: 20%;
      top: 20%;
      width: 50%;
      height: 50%;
      background-color: rgba(220, 230, 242, 0.5);
    }
&lt;/style>

&lt;div id="grid">
    &lt;div class=”exclusion”>&lt;/div>
    &lt;div id="rowA" style=”wrap-through: wrap;”> Lorem ipsum dolor sit amet...&lt;/div>
    &lt;div id="rowB" style=”wrap-through: none;”> Lorem ipsum dolor sit amet...&lt;/div>
&lt;/div>
</code></pre>
    <p><img alt="Example rendering of wrap-through: wrap | none" class="singleImgExample" src="images/exclusion_wrap_through.png" style="max-width:40%"></p>
   </div>
   <h3 class="heading settled" data-level="3.4" id="exclusions-order"><span class="secno">3.4. </span><span class="content"> Exclusions order</span><a class="self-link" href="#exclusions-order"></a></h3>
   <p>Exclusions follow the painting order (See <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> Appendix E). Exclusions are
  applied in reverse to the document order in which they are defined. The last exclusion
  appears on top of all other exclusion, thus it affects the inline flow content of
  all other preceding exclusions or elements descendant of the same containing block.
  The <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-position-3/#propdef-z-index" id="ref-for-propdef-z-index①">z-index</a> property can be used to change the ordering of <a href="https://www.w3.org/TR/CSS2/visuren.html#choose-position">positioned</a> exclusion
  boxes (see <span>[CSS21]</span>). Statically positioned exclusions are not affected by the <span class="property" id="ref-for-propdef-z-index②">z-index</span> property and thus follow the painting order.</p>
   <div class="example" id="example-d42a15a1">
    <a class="self-link" href="#example-d42a15a1"></a> 
    <p>Ordering of exclusions.</p>
<pre><code class="html">&lt;style type="text/css">
    .exclusion  {
      wrap-flow: both;
      position: absolute;
      width: 200px;
    }
    .topleft {
      top: 10px;
      left: 10px;
      background-color: lightblue;
    }
    .middle {
      top: 90px;
      left: 90px;
      background-color: lightgreen;
    }
    .bottomright {
      top: 170px;
      left: 170px;
      background-color: pink;
    }
&lt;/style>

&lt;div class="exclusion topleft">
    The top left div...
&lt;/div>
&lt;div class="exclusion middle">
    The middle div...
&lt;/div>
&lt;div class="exclusion bottomright">
    The bottom right div...
&lt;/div>
</code></pre>
    <table class="example-table">
     <tbody>
      <tr>
       <td style="width:50%"><code class="html">.middle { z-index: auto; }</code>
       <td style="width:50%"><code class="html">.middle { z-index: 1; }</code>
      <tr>
       <td><img alt="Example rendering of default exclusion ordering." class="singleImgExample" src="images/exclusion_ordering.png">
       <td><img alt="Example rendering of default exclusion ordering." class="singleImgExample" src="images/exclusion_ordering_z_order.png">
    </table>
   </div>
   <div class="issue-marker wrapper">
    <div class="issue-marker">
      <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15183">Issue-15183</a> 
     <div class="issue-details">
      <p class="short-desc">Is the CSS exclusions processing model incorrect?</p>
     </div>
    </div>
   </div>
   <div class="issue" id="issue-5c31dc98">
    <a class="self-link" href="#issue-5c31dc98"></a> 
    <p>The current draft provides a model for exclusions
  without a collision-avoidance model.
  The existing exclusion model in CSS uses floats,
  which have both exclusion and collision-avoidance behavior.
  Concerns have been raised that allowing exclusions
  without collision avoidance could be harmful,
  particularly with absolutely-positioned elements.
  Three options should be considered:</p>
    <ol>
     <li>Allow exclusions in positioning schemes
      with no collision avoidance.
     <li>Disallow exclusions in positioning schemes
      with no collision avoidance.
     <li>Define collision-avoidance behavior
      for positioning schemes without it,
      and use this behavior by default with exclusions.
    </ol>
   </div>
   <h3 class="heading settled" data-level="3.5" id="exclusions-processing-model"><span class="secno">3.5. </span><span class="content"> Processing model</span><a class="self-link" href="#exclusions-processing-model"></a></h3>
   <h4 class="heading settled" data-level="3.5.1" id="exclusions-processing-model-description"><span class="secno">3.5.1. </span><span class="content"> Description</span><a class="self-link" href="#exclusions-processing-model-description"></a></h4>
   <p>Applying exclusions is a two-step process:</p>
   <ul>
    <li><strong>Step 1</strong>: resolve exclusion boxes belonging to each <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context⑦">wrapping context</a> 
    <li>
     <strong>Step 2</strong>: resolve each <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context⑧">wrapping context</a> and lay out
  each containing block in turn: 
     <ul>
      <li><strong>Step 2-A</strong>: resolve the position and size of exclusion
    boxes 
      <li><strong>Step 2-B</strong>: lay out containing block, wrapping around
    each <a data-link-type="dfn" href="#exclusion-area" id="ref-for-exclusion-area②">exclusion area</a> 
     </ul>
   </ul>
   <h4 class="heading settled" data-level="3.5.2" id="step-1"><span class="secno">3.5.2. </span><span class="content"> Step 1: resolve exclusion boxes belonging to each <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context⑨">wrapping context</a></span><a class="self-link" href="#step-1"></a></h4>
   <p>In this step, the user agent determines which <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">containing block</a> each <a data-link-type="dfn" href="#exclusion-area" id="ref-for-exclusion-area③">exclusion area</a> belongs to. This is a simple step, based on the definition of containing
  blocks and elements with a computed value for <a class="property" data-link-type="propdesc" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow⑨">wrap-flow</a> that is not <code class="css">auto</code>.</p>
   <h4 class="heading settled" data-level="3.5.3" id="step-2"><span class="secno">3.5.3. </span><span class="content"> Step 2: resolve wrapping contexts and lay out containing blocks</span><a class="self-link" href="#step-2"></a></h4>
   <p>In this step, starting from the top of the <a href="https://www.w3.org/TR/CSS2/visuren.html#z-index">rendering tree</a> (see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>), the the agent processes each
  containing block in two sub-steps.</p>
   <h4 class="heading settled" data-level="3.5.4" id="step-2-A"><span class="secno">3.5.4. </span><span class="content"> Step 2-A: resolve the position and size of exclusion boxes</span><a class="self-link" href="#step-2-A"></a></h4>
   <p>Resolving the position and size of <a data-link-type="dfn" href="#exclusion-box" id="ref-for-exclusion-box">exclusion boxes</a> in the <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①⓪">wrapping
  context</a> may or may not require a layout. For example, if an <span id="ref-for-exclusion-box①">exclusion
  box</span> is absolutely positioned and sized, a layout may not be needed to
  resolve its position and size. In other situations, laying out the containing
  block’s content is required.</p>
   <p>When a layout is required, it is carried out without applying any <a data-link-type="dfn" href="#exclusion-area" id="ref-for-exclusion-area④">exclusion
  area</a>. In other words, the containing block is laid out without a <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①①">wrapping context</a>.</p>
   <p>Step 2-A yields a position and size for all <a data-link-type="dfn" href="#exclusion-box" id="ref-for-exclusion-box②">exclusion boxes</a> in the <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①②">wrapping context</a>. Each exclusion box is processed in turn, starting from
  the top-most, and each <a data-link-type="dfn" href="#exclusion-area" id="ref-for-exclusion-area⑤">exclusion area</a> is computed and contributed to the <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">containing
  block’s</a> <span id="ref-for-wrapping-context①③">wrapping context</span>.</p>
   <p>Scrolling is ignored in this step when resolving the position and size of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-position-3/#propdef-position" id="ref-for-propdef-position①">position</a>: <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-position-3/#valdef-position-fixed" id="ref-for-valdef-position-fixed①">fixed</a> <a data-link-type="dfn" href="#exclusion-box" id="ref-for-exclusion-box③">exclusion boxes</a>.</p>
   <p>Once the <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">containing block’s</a> <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①④">wrapping context</a> is computed, all <a data-link-type="dfn" href="#exclusion-box" id="ref-for-exclusion-box④">exclusion boxes</a> in
  that <span id="ref-for-wrapping-context①⑤">wrapping context</span> are removed from the normal flow.</p>
   <h4 class="heading settled" data-level="3.5.5" id="step-2-B"><span class="secno">3.5.5. </span><span class="content"> Step 2-B: lay out containing block applying wrapping</span><a class="self-link" href="#step-2-B"></a></h4>
   <p>Finally, the content of the containing block is laid out, with the inline content
wrapping around the <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①⑥">wrapping context</a>’s <a data-link-type="dfn" href="#exclusion-area" id="ref-for-exclusion-area⑥">exclusion area</a>.</p>
   <p>When the containing block itself is an <a data-link-type="dfn" href="#exclusion-box" id="ref-for-exclusion-box⑤">exclusion box</a>, then rules on <a href="#exclusions-order">exclusions order</a> define which exclusions affect
  the inline and descendant content of the box.</p>
   <h4 class="heading settled" data-level="3.5.6" id="processing-model-example"><span class="secno">3.5.6. </span><span class="content"> Processing Model Example</span><a class="self-link" href="#processing-model-example"></a></h4>
   <p>This section illustrates the exclusions processing model with an example.
  It is meant to be simple. Yet, it contains enough complexity to address the
  issues of layout dependencies and re-layout.</p>
   <p>The code snippet in the following example has two exclusions affecting the
  document’s inline content.</p>
   <div class="example" id="example-09557e3c">
    <a class="self-link" href="#example-09557e3c"></a> 
<pre class="html">&lt;html>&lt;style>
#d1 {
    position:relative;
    height: auto;
    color: #46A4E9;
    border: 1px solid gray;
}

#e1 {
    wrap-flow: both;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40%;
    height: 40%;
    border: 1px solid red;
    margin-left: -20%;
    margin-top: -20%;
}

#d2 {
    position: static;
    width: 100%;
    height: auto;
    color: #808080;
}

#e2 {
    wrap-flow: both;
    position: absolute;
    right: 5ex;
    top: 1em;
    width: 12ex;
    height: 10em;
    border: 1px solid lime;
}
&lt;/style>
&lt;body>
    &lt;div id="d1">
        Lorem ipsusm ...
        &lt;p id="e1">&lt;/p>
    &lt;/div>
    &lt;div id="d2">
        Lorem ipsusm ...
        &lt;p id="e2" >&lt;/p>
    &lt;/div>
&lt;/body>
&lt;/html></pre>
   </div>
   <p>The following figures illustrate:</p>
   <ul>
    <li>the document’s DOM tree 
    <li>the layout tree of generated block boxes 
   </ul>
   <div class="figure">
     <img alt="DOM tree nodes" src="images/processing-model-example-dom.svg" width="200"> 
    <p class="caption">DOM tree </p>
   </div>
   <div class="figure">
     <img alt="Layout tree boxes" src="images/processing-model-example-layout-tree.svg" width="350"> 
    <p class="caption">Layout tree of generated block boxes </p>
   </div>
   <h5 class="heading settled" data-level="3.5.6.1" id="example-step-1"><span class="secno">3.5.6.1. </span><span class="content"> Step 1: resolve exclusion boxes belonging to each <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①⑦">wrapping context</a></span><a class="self-link" href="#example-step-1"></a></h5>
   <p>The figures illustrate how the boxes corresponding to the element sometimes
  have a different containment hierarchy in the layout tree than in the DOM tree.
  For example, the box generated by <code class="idl">e1</code> is positioned in
  its containing block’s box, which is the <code class="idl">d1-box</code>, because <code class="idl">e1</code> is absolutely positioned and <code class="idl">d1</code> is relatively positioned. However, while <code class="idl">e2</code> is also absolutely
  positioned, its containing block is the initial containing block (ICB). See the
  section 10.1 of the CSS 2.1 specification (<a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>) for details.</p>
   <p>As a result of the computation of containing blocks for the tree, the boxes
  belonging to the <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①⑧">wrapping context</a>s of all the elements can be determined:</p>
   <ul>
    <li>The <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context①⑨">wrapping context</a> for the html element contains the <code class="idl">e2</code> box: WC-1 (Wrapping Context 1) 
    <li>The <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②⓪">wrapping context</a> for the body element inherits the html
    element’s <span id="ref-for-wrapping-context②①">wrapping context</span>: WC-1 
    <li>The <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②②">wrapping context</a> for <code class="idl">d1</code> inherits the
    body element’s <span id="ref-for-wrapping-context②③">wrapping context</span> and adds the <code class="idl">e1-box</code> to it. So the wrapping context is made of both the <code class="idl">e1-box</code> and the <code class="idl">e2-box</code>:
    WC-2
    <li>The <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②④">wrapping context</a> for <code class="idl">d2</code> inherits the
    body element’s <span id="ref-for-wrapping-context②⑤">wrapping context</span>: WC-1 
   </ul>
   <h5 class="heading settled" data-level="3.5.6.2" id="example-step-2"><span class="secno">3.5.6.2. </span><span class="content"> Step 2: resolve wrapping contexts and lay out containing blocks</span><a class="self-link" href="#example-step-2"></a></h5>
   <p>In this step, each containing block is processed in turn. For each containing
  block, we (conceptually) go through two phases:</p>
   <ol>
    <li>resolve the <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②⑥">wrapping context</a>: resolve the position and size of its
  exclusions 
    <li>lay out the containing block 
   </ol>
   <p>In our example, this breaks down to:</p>
   <ol>
    <li>resolve the position and size of the exclusions belonging to WC-1:
    RWC-1 (Resolved Wrapping Context 1). 
    <li>
     lay out the initial containing block (i.e., lay out its content): 
     <ol>
      <li>resolve the html element’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②⑦">wrapping context</a>: RWC-1 
      <li>
       lay out the html element: 
       <ol>
        <li>resolve the body element’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②⑧">wrapping context</a>: RWC-1 
        <li>
         lay out the body element: 
         <ol>
          <li>resolve the <code class="idl">d1</code> element’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context②⑨">wrapping
              context</a>: RWC-2 
          <li>lay out the <code class="idl">d1</code> element 
          <li>resolve the <code class="idl">d2</code> element’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context③⓪">wrapping
              context</a>: RWC-1 
          <li>lay out the <code class="idl">d2</code> element 
         </ol>
       </ol>
     </ol>
   </ol>
   <h6 class="heading settled" data-level="3.5.6.2.1" id="example-resolving-rwc-1"><span class="secno">3.5.6.2.1. </span><span class="content"> Resolving RWC-1</span><a class="self-link" href="#example-resolving-rwc-1"></a></h6>
   <p>The top-most <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context③①">wrapping context</a> in the layout tree contains the <code class="idl">e2</code> exclusion. Its position and size needs to be
  resolved. In general, computing an exclusion’s position and size may or may
  not require laying out other content. In this example, no content needs to be
  laid out to resolve the <code class="idl">e2</code> exclusion’s position
  because it is absolutely positioned and its size can be resolved without
  layout either. At this point, RWC-1 is resolved and can be used when laying
  inline content out.</p>
   <p></p>
   <h6 class="heading settled" data-level="3.5.6.2.2" id="example-resolving-rwc-2"><span class="secno">3.5.6.2.2. </span><span class="content"> Resolving RWC-2</span><a class="self-link" href="#example-resolving-rwc-2"></a></h6>
   <p>The process is similar: the position of the <code class="idl">e1</code> exclusion needs to be resolved. Again, resolving the exclusion’s position and
  size may require processing the containing block (d1 here). It is the case here
  because the size and position of <code class="idl">e1</code> depend on
  resolving the percentage lengths. The percentages are relative to the size of <code class="idl">d1</code>’s box. As a result, in order to resolve a size for <code class="idl">d1</code>’s box, a first layout of <code class="idl">d1</code> is done without any <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context③②">wrapping context</a> (i.e., no exclusions applied).
  The layout yields a position and size for <code class="idl">e1</code>’s box.</p>
   <p>At this point, RWC-2 is resolved because the position and size of both e1 and
  e2 are resolved.</p>
   <p class="note" role="note">The important aspect of the above processing example is that
  once an element’s <a data-link-type="dfn" href="#wrapping-context" id="ref-for-wrapping-context③③">wrapping context</a> is resolved (by resolving its
  exclusions' position and size), the position and size of the exclusions are
  not re-processed if the element’s size changes between the layout that may be
  done without considering any <span id="ref-for-wrapping-context③④">wrapping context</span> (as for RWC-2) and the
  layout done with the resolved <span id="ref-for-wrapping-context③⑤">wrapping context</span>. This is what breaks the
  possible circular dependency between the resolution of <span id="ref-for-wrapping-context③⑥">wrapping context</span>s
  and the layout of containing blocks.</p>
   <h3 class="heading settled" data-level="3.6" id="floats-and-exclusions"><span class="secno">3.6. </span><span class="content"> Floats and exclusions</span><a class="self-link" href="#floats-and-exclusions"></a></h3>
   <h4 class="heading settled" data-level="3.6.1" id="floats-and-exclusions-similarities"><span class="secno">3.6.1. </span><span class="content"> Similarities</span><a class="self-link" href="#floats-and-exclusions-similarities"></a></h4>
   <p>There are similarities between floats and exclusions in that inline content
  wraps around floats and also wraps around <span>exclusion areas</span>. However,
  there are very significant differences.</p>
   <h4 class="heading settled" data-level="3.6.2" id="floats-and-exclusions-differences"><span class="secno">3.6.2. </span><span class="content"> Differences</span><a class="self-link" href="#floats-and-exclusions-differences"></a></h4>
   <ul>
    <li><strong>scope</strong>. While floats apply to content that follows in the
    document, exclusions apply to content in their containing block. 
    <li><strong>positioning</strong>. Floats are part of the inline flow and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visuren.html#propdef-float" id="ref-for-propdef-float①">float</a> on the line box. Authors can control how the floats move on the line
    box, to the right or to the left. By contrast, exclusions can be positioned
    using any positioning scheme such as grid layout (<a data-link-type="biblio" href="#biblio-css3-grid-layout">[CSS3-GRID-LAYOUT]</a>),
    flexible box (<a data-link-type="biblio" href="#biblio-css3-flexbox">[CSS3-FLEXBOX]</a>) or any other CSS positioning scheme. 
    <li><strong>separation of concerns</strong>. Making an element a float
    determines both its positioning scheme and its effect on inline content.
    Making an element an exclusion only determines its impact on inline content
    and does not impose constraints on its positioning method. 
   </ul>
   <h4 class="heading settled" data-level="3.6.3" id="floats-interop"><span class="secno">3.6.3. </span><span class="content"> Interoperability</span><a class="self-link" href="#floats-interop"></a></h4>
   <h5 class="heading settled" data-level="3.6.3.1" id="effect-of-floats-on-exclusions"><span class="secno">3.6.3.1. </span><span class="content"> Effect of floats on exclusions</span><a class="self-link" href="#effect-of-floats-on-exclusions"></a></h5>
   <p>Floats have an effect on the positioning of exclusions and the layout of their
  inline content. For example, if an exclusion is an inline-box which happens to
  be on the same line as a float, its position, as computed in <a href="#step-2-A">Step 2-A</a> will be impacted by the float, as is any other
  inline content.</p>
   <h5 class="heading settled" data-level="3.6.3.2" id="effect-of-exclusions-on-floats"><span class="secno">3.6.3.2. </span><span class="content"> Effect of exclusions on floats</span><a class="self-link" href="#effect-of-exclusions-on-floats"></a></h5>
   <p>Exclusions have an effect on the positioning of floats as they have an effect
  on inline content. Therefore, in <a href="#step-2-B">Step 2-B</a>, floats will
  avoid <a data-link-type="dfn" href="#exclusion-area" id="ref-for-exclusion-area⑦">exclusion areas</a>.</p>
   <h2 class="no-num heading settled" id="acks"><span class="content"> Acknowledgments</span><a class="self-link" href="#acks"></a></h2>
   <p>This specification is made possible by input from
  Andrei Bucur,
  Alexandru Chiculita,
  Arron Eicholz,
  Daniel Glazman,
  Arno Gourdol,
  Chris Jones,
  Bem Jones-Bey,
  Marcus Mielke,
  Alex Mogilevsky,
  Hans Muller,
  Mihnea Ovidenie,
  Virgil Palanciuc,
  Florian Rivoal,
  Peter Sorotokin,
  Bear Travis,
  Eugene Veselov,
  Stephen Zilles
  and the CSS Working Group members.</p>
   <h2 class="no-num heading settled" id="changes"><span class="content">Changes</span><a class="self-link" href="#changes"></a></h2>
   <h3 class="no-num heading settled" id="recent-changes"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2015/WD-css3-exclusions-20150115/">15 January 2015 Working Draft</a></span><a class="self-link" href="#recent-changes"></a></h3>
   <h3 class="no-num heading settled" id="changes-2013"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2013/WD-css3-exclusions-20130528/">28 May 2013 Working Draft</a></span><a class="self-link" href="#changes-2013"></a></h3>
   <ul>
    <li>Editorial fixes. 
   </ul>
   <h3 class="no-num heading settled" id="changes-2012"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2012/WD-css3-exclusions-20120503/">3 May 2012 Working Draft</a></span><a class="self-link" href="#changes-2012"></a></h3>
   <ul>
    <li>Split Exclusions from Shapes. 
    <li>Improved exclusion order example. 
    <li>Editorial and markup fixes. 
    <li>See also the Changes section of <a href="https://www.w3.org/TR/css-shapes/#20120503">CSS Shapes</a>. 
   </ul>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
	descriptive assertions and RFC 2119 terminology. The key words “MUST”,
	“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
	“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
	document are to be interpreted as described in RFC 2119.
	However, for readability, these words do not appear in all uppercase
	letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
	explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
	or are set apart from the normative text with <code>class="example"</code>,
	like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
	normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
	set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
	this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
	is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
			style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
			documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
	if all of its statements that use syntax defined in this module are valid
	according to the generic CSS grammar and the individual grammars of each
	feature defined in this module. </p>
  <p>A renderer is conformant to this specification
	if, in addition to interpreting the style sheet as defined by the
	appropriate specifications, it supports all the features defined
	by this specification by parsing them correctly
	and rendering the document accordingly. However, the inability of a
	UA to correctly render a document due to limitations of the device
	does not make the UA non-conformant. (For example, a UA is not
	required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
	if it writes style sheets that are syntactically correct according to the
	generic CSS grammar and the individual grammars of each feature in
	this module, and meet all other conformance requirements of style sheets
	as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
		for implementing CSS responsibly,
		in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
		(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
		any at-rules, properties, property values, keywords, and other syntactic constructs
		for which they have no usable level of support</strong>.
		In particular, user agents <em>must not</em> selectively ignore
		unsupported property values and honor supported values in a single multi-value property declaration:
		if any value is considered invalid (as unsupported values must be),
		CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
		the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
		implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
		of any CR-level feature they can demonstrate
		to be correctly implemented according to spec,
		and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
		implementations, the CSS Working Group requests that non-experimental
		CSS renderers submit an implementation report (and, if necessary, the
		testcases used for that implementation report) to the W3C before
		releasing an unprefixed implementation of any CSS features. Testcases
		submitted to W3C are subject to review and correction by the CSS
		Working Group. </p>
  <p>
   Further information on submitting testcases and implementation reports
		can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
		Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#valdef-wrap-flow-auto">auto</a><span>, in §3.1.1</span>
   <li><a href="#valdef-wrap-flow-both">both</a><span>, in §3.1.1</span>
   <li><a href="#valdef-wrap-flow-clear">clear</a><span>, in §3.1.1</span>
   <li><a href="#content-area">Content area</a><span>, in §2</span>
   <li><a href="#valdef-wrap-flow-end">end</a><span>, in §3.1.1</span>
   <li><a href="#exclusion-area">Exclusion area</a><span>, in §2</span>
   <li><a href="#exclusion-box">Exclusion box</a><span>, in §2</span>
   <li><a href="#exclusion-element">Exclusion element</a><span>, in §2</span>
   <li><a href="#inside">inside</a><span>, in §2</span>
   <li><a href="#valdef-wrap-flow-maximum">maximum</a><span>, in §3.1.1</span>
   <li><a href="#valdef-wrap-flow-minimum">minimum</a><span>, in §3.1.1</span>
   <li><a href="#valdef-wrap-through-none">none</a><span>, in §3.3.1</span>
   <li><a href="#outside">Outside</a><span>, in §2</span>
   <li><a href="#valdef-wrap-flow-start">start</a><span>, in §3.1.1</span>
   <li><a href="#valdef-wrap-through-wrap">wrap</a><span>, in §3.3.1</span>
   <li><a href="#propdef-wrap-flow">wrap-flow</a><span>, in §3.1.1</span>
   <li><a href="#wrapping-area">Wrapping area</a><span>, in §2</span>
   <li><a href="#wrapping-context">Wrapping context</a><span>, in §2</span>
   <li><a href="#propdef-wrap-through">wrap-through</a><span>, in §3.3.1</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-list-style-position-outside">
   <a href="https://drafts.csswg.org/css-lists-3/#list-style-position-outside">https://drafts.csswg.org/css-lists-3/#list-style-position-outside</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-list-style-position-outside">3.3. 
Propagation of Exclusions</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-float-none">
   <a href="https://drafts.csswg.org/css-page-floats-3/#valdef-float-none">https://drafts.csswg.org/css-page-floats-3/#valdef-float-none</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-float-none">2. 
Terminology</a>
    <li><a href="#ref-for-valdef-float-none①">3.1.1. 
The wrap-flow property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-position-fixed">
   <a href="https://drafts.csswg.org/css-position-3/#valdef-position-fixed">https://drafts.csswg.org/css-position-3/#valdef-position-fixed</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-position-fixed">3.2. 
Scope and effect of exclusions</a>
    <li><a href="#ref-for-valdef-position-fixed①">3.5.4. 
Step 2-A: resolve the position and size of exclusion boxes</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-position">
   <a href="https://drafts.csswg.org/css-position-3/#propdef-position">https://drafts.csswg.org/css-position-3/#propdef-position</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-position">3.2. 
Scope and effect of exclusions</a>
    <li><a href="#ref-for-propdef-position①">3.5.4. 
Step 2-A: resolve the position and size of exclusion boxes</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-z-index">
   <a href="https://drafts.csswg.org/css-position-3/#propdef-z-index">https://drafts.csswg.org/css-position-3/#propdef-z-index</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-z-index">3. 
Exclusions</a>
    <li><a href="#ref-for-propdef-z-index①">3.4. 
Exclusions order</a> <a href="#ref-for-propdef-z-index②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-one">
   <a href="https://drafts.csswg.org/css-values-4/#comb-one">https://drafts.csswg.org/css-values-4/#comb-one</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-one">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-comb-one①">(2)</a> <a href="#ref-for-comb-one②">(3)</a> <a href="#ref-for-comb-one③">(4)</a> <a href="#ref-for-comb-one④">(5)</a> <a href="#ref-for-comb-one⑤">(6)</a>
    <li><a href="#ref-for-comb-one⑥">3.3.1. 
The wrap-through Property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-float">
   <a href="https://drafts.csswg.org/css2/visuren.html#propdef-float">https://drafts.csswg.org/css2/visuren.html#propdef-float</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-float">3.1.1. 
The wrap-flow property</a>
    <li><a href="#ref-for-propdef-float①">3.6.2. 
Differences</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-border-box">
   <a href="https://drafts.csswg.org/css-box-3/#border-box">https://drafts.csswg.org/css-box-3/#border-box</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-border-box">2. 
Terminology</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-lists-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-list-style-position-outside" style="color:initial">outside</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-page-floats-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-float-none" style="color:initial">none</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-position-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-position-fixed" style="color:initial">fixed</span>
     <li><span class="dfn-paneled" id="term-for-propdef-position" style="color:initial">position</span>
     <li><span class="dfn-paneled" id="term-for-propdef-z-index" style="color:initial">z-index</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-comb-one" style="color:initial">|</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS21]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-float" style="color:initial">float</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS3BOX]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-border-box" style="color:initial">border box</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-css-lists-3">[CSS-LISTS-3]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-lists-3/">CSS Lists Module Level 3</a>. 25 April 2019. WD. URL: <a href="https://www.w3.org/TR/css-lists-3/">https://www.w3.org/TR/css-lists-3/</a>
   <dt id="biblio-css-page-floats-3">[CSS-PAGE-FLOATS-3]
   <dd>Johannes Wilm. <a href="https://www.w3.org/TR/css-page-floats-3/">CSS Page Floats</a>. 15 September 2015. WD. URL: <a href="https://www.w3.org/TR/css-page-floats-3/">https://www.w3.org/TR/css-page-floats-3/</a>
   <dt id="biblio-css-position-3">[CSS-POSITION-3]
   <dd>Rossen Atanassov; Arron Eicholz. <a href="https://www.w3.org/TR/css-position-3/">CSS Positioned Layout Module Level 3</a>. 17 May 2016. WD. URL: <a href="https://www.w3.org/TR/css-position-3/">https://www.w3.org/TR/css-position-3/</a>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css21">[CSS21]
   <dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS2/">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS2/">https://www.w3.org/TR/CSS2/</a>
   <dt id="biblio-css3-writing-modes">[CSS3-WRITING-MODES]
   <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-3/">CSS Writing Modes Level 3</a>. 24 May 2018. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-3/">https://www.w3.org/TR/css-writing-modes-3/</a>
   <dt id="biblio-css3box">[CSS3BOX]
   <dd>Elika Etemad. <a href="https://www.w3.org/TR/css-box-3/">CSS Box Model Module Level 3</a>. 18 December 2018. WD. URL: <a href="https://www.w3.org/TR/css-box-3/">https://www.w3.org/TR/css-box-3/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
  </dl>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-css3-flexbox">[CSS3-FLEXBOX]
   <dd>Tab Atkins Jr.; et al. <a href="https://www.w3.org/TR/css-flexbox-1/">CSS Flexible Box Layout Module Level 1</a>. 19 November 2018. CR. URL: <a href="https://www.w3.org/TR/css-flexbox-1/">https://www.w3.org/TR/css-flexbox-1/</a>
   <dt id="biblio-css3-grid-layout">[CSS3-GRID-LAYOUT]
   <dd>Tab Atkins Jr.; Elika Etemad; Rossen Atanassov. <a href="https://www.w3.org/TR/css-grid-1/">CSS Grid Layout Module Level 1</a>. 14 December 2017. CR. URL: <a href="https://www.w3.org/TR/css-grid-1/">https://www.w3.org/TR/css-grid-1/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Applies to
      <th scope="col">Inh.
      <th scope="col">%ages
      <th scope="col">Anim­ation type
      <th scope="col">Canonical order
      <th scope="col">Com­puted value
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-wrap-flow" id="ref-for-propdef-wrap-flow①⓪">wrap-flow</a>
      <td>auto | both | start | end | minimum | maximum | clear
      <td>auto
      <td>block-level elements.
      <td>no
      <td>N/A
      <td>discrete
      <td>per grammar
      <td>as specified except for element’s whose float computed value is not none, in which case the computed value is auto.
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-wrap-through" id="ref-for-propdef-wrap-through⑥">wrap-through</a>
      <td>wrap | none
      <td>wrap
      <td>block-level elements
      <td>no
      <td>N/A
      <td>discrete
      <td>per grammar
      <td>as specified
   </table>
  </div>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue">
    <p>The current draft provides a model for exclusions
  without a collision-avoidance model.
  The existing exclusion model in CSS uses floats,
  which have both exclusion and collision-avoidance behavior.
  Concerns have been raised that allowing exclusions
  without collision avoidance could be harmful,
  particularly with absolutely-positioned elements.
  Three options should be considered:</p>
    <ol>
     <li>Allow exclusions in positioning schemes
      with no collision avoidance.
     <li>Disallow exclusions in positioning schemes
      with no collision avoidance.
     <li>Define collision-avoidance behavior
      for positioning schemes without it,
      and use this behavior by default with exclusions.
    </ol>
     <a href="#issue-5c31dc98"> ↵ </a>
   </div>
  </div>
  <aside class="dfn-panel" data-for="exclusion-box">
   <b><a href="#exclusion-box">#exclusion-box</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-exclusion-box">3.5.4. 
Step 2-A: resolve the position and size of exclusion boxes</a> <a href="#ref-for-exclusion-box①">(2)</a> <a href="#ref-for-exclusion-box②">(3)</a> <a href="#ref-for-exclusion-box③">(4)</a> <a href="#ref-for-exclusion-box④">(5)</a>
    <li><a href="#ref-for-exclusion-box⑤">3.5.5. 
Step 2-B: lay out containing block applying wrapping</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="exclusion-area">
   <b><a href="#exclusion-area">#exclusion-area</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-exclusion-area">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-exclusion-area①">(2)</a>
    <li><a href="#ref-for-exclusion-area②">3.5.1. 
Description</a>
    <li><a href="#ref-for-exclusion-area③">3.5.2. 
Step 1: resolve exclusion boxes belonging to each wrapping context</a>
    <li><a href="#ref-for-exclusion-area④">3.5.4. 
Step 2-A: resolve the position and size of exclusion boxes</a> <a href="#ref-for-exclusion-area⑤">(2)</a>
    <li><a href="#ref-for-exclusion-area⑥">3.5.5. 
Step 2-B: lay out containing block applying wrapping</a>
    <li><a href="#ref-for-exclusion-area⑦">3.6.3.2. 
Effect of exclusions on floats</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="exclusion-element">
   <b><a href="#exclusion-element">#exclusion-element</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-exclusion-element">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-exclusion-element①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="wrapping-context">
   <b><a href="#wrapping-context">#wrapping-context</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-wrapping-context">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-wrapping-context①">(2)</a>
    <li><a href="#ref-for-wrapping-context②">3.3. 
Propagation of Exclusions</a> <a href="#ref-for-wrapping-context③">(2)</a> <a href="#ref-for-wrapping-context④">(3)</a>
    <li><a href="#ref-for-wrapping-context⑤">3.3.1. 
The wrap-through Property</a> <a href="#ref-for-wrapping-context⑥">(2)</a>
    <li><a href="#ref-for-wrapping-context⑦">3.5.1. 
Description</a> <a href="#ref-for-wrapping-context⑧">(2)</a>
    <li><a href="#ref-for-wrapping-context⑨">3.5.2. 
Step 1: resolve exclusion boxes belonging to each wrapping context</a>
    <li><a href="#ref-for-wrapping-context①⓪">3.5.4. 
Step 2-A: resolve the position and size of exclusion boxes</a> <a href="#ref-for-wrapping-context①①">(2)</a> <a href="#ref-for-wrapping-context①②">(3)</a> <a href="#ref-for-wrapping-context①③">(4)</a> <a href="#ref-for-wrapping-context①④">(5)</a> <a href="#ref-for-wrapping-context①⑤">(6)</a>
    <li><a href="#ref-for-wrapping-context①⑥">3.5.5. 
Step 2-B: lay out containing block applying wrapping</a>
    <li><a href="#ref-for-wrapping-context①⑦">3.5.6.1. 
Step 1: resolve exclusion boxes belonging to each wrapping context</a> <a href="#ref-for-wrapping-context①⑧">(2)</a> <a href="#ref-for-wrapping-context①⑨">(3)</a> <a href="#ref-for-wrapping-context②⓪">(4)</a> <a href="#ref-for-wrapping-context②①">(5)</a> <a href="#ref-for-wrapping-context②②">(6)</a> <a href="#ref-for-wrapping-context②③">(7)</a> <a href="#ref-for-wrapping-context②④">(8)</a> <a href="#ref-for-wrapping-context②⑤">(9)</a>
    <li><a href="#ref-for-wrapping-context②⑥">3.5.6.2. 
Step 2: resolve wrapping contexts and lay out containing blocks</a> <a href="#ref-for-wrapping-context②⑦">(2)</a> <a href="#ref-for-wrapping-context②⑧">(3)</a> <a href="#ref-for-wrapping-context②⑨">(4)</a> <a href="#ref-for-wrapping-context③⓪">(5)</a>
    <li><a href="#ref-for-wrapping-context③①">3.5.6.2.1. 
Resolving RWC-1</a>
    <li><a href="#ref-for-wrapping-context③②">3.5.6.2.2. 
Resolving RWC-2</a> <a href="#ref-for-wrapping-context③③">(2)</a> <a href="#ref-for-wrapping-context③④">(3)</a> <a href="#ref-for-wrapping-context③⑤">(4)</a> <a href="#ref-for-wrapping-context③⑥">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="content-area">
   <b><a href="#content-area">#content-area</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-content-area">2. 
Terminology</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="outside">
   <b><a href="#outside">#outside</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-outside">2. 
Terminology</a>
    <li><a href="#ref-for-outside①">3.3. 
Propagation of Exclusions</a>
    <li><a href="#ref-for-outside②">3.3.1. 
The wrap-through Property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="inside">
   <b><a href="#inside">#inside</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inside">2. 
Terminology</a>
    <li><a href="#ref-for-inside①">3.3.1. 
The wrap-through Property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-wrap-flow">
   <b><a href="#propdef-wrap-flow">#propdef-wrap-flow</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-wrap-flow">2. 
Terminology</a>
    <li><a href="#ref-for-propdef-wrap-flow①">3.1. 
Declaring exclusions</a>
    <li><a href="#ref-for-propdef-wrap-flow②">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-propdef-wrap-flow③">(2)</a> <a href="#ref-for-propdef-wrap-flow④">(3)</a> <a href="#ref-for-propdef-wrap-flow⑤">(4)</a> <a href="#ref-for-propdef-wrap-flow⑥">(5)</a> <a href="#ref-for-propdef-wrap-flow⑦">(6)</a> <a href="#ref-for-propdef-wrap-flow⑧">(7)</a>
    <li><a href="#ref-for-propdef-wrap-flow⑨">3.5.2. 
Step 1: resolve exclusion boxes belonging to each wrapping context</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-flow-auto">
   <b><a href="#valdef-wrap-flow-auto">#valdef-wrap-flow-auto</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-flow-auto">2. 
Terminology</a>
    <li><a href="#ref-for-valdef-wrap-flow-auto①">3.1. 
Declaring exclusions</a>
    <li><a href="#ref-for-valdef-wrap-flow-auto②">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-valdef-wrap-flow-auto③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-flow-both">
   <b><a href="#valdef-wrap-flow-both">#valdef-wrap-flow-both</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-flow-both">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-valdef-wrap-flow-both①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-flow-start">
   <b><a href="#valdef-wrap-flow-start">#valdef-wrap-flow-start</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-flow-start">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-valdef-wrap-flow-start①">(2)</a> <a href="#ref-for-valdef-wrap-flow-start②">(3)</a> <a href="#ref-for-valdef-wrap-flow-start③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-flow-end">
   <b><a href="#valdef-wrap-flow-end">#valdef-wrap-flow-end</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-flow-end">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-valdef-wrap-flow-end①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-flow-minimum">
   <b><a href="#valdef-wrap-flow-minimum">#valdef-wrap-flow-minimum</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-flow-minimum">3.1.1. 
The wrap-flow property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-flow-maximum">
   <b><a href="#valdef-wrap-flow-maximum">#valdef-wrap-flow-maximum</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-flow-maximum">3.1.1. 
The wrap-flow property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-flow-clear">
   <b><a href="#valdef-wrap-flow-clear">#valdef-wrap-flow-clear</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-flow-clear">3.1.1. 
The wrap-flow property</a> <a href="#ref-for-valdef-wrap-flow-clear①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="propdef-wrap-through">
   <b><a href="#propdef-wrap-through">#propdef-wrap-through</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-wrap-through">2. 
Terminology</a>
    <li><a href="#ref-for-propdef-wrap-through①">3.2. 
Scope and effect of exclusions</a>
    <li><a href="#ref-for-propdef-wrap-through②">3.3. 
Propagation of Exclusions</a> <a href="#ref-for-propdef-wrap-through③">(2)</a>
    <li><a href="#ref-for-propdef-wrap-through④">3.3.1. 
The wrap-through Property</a> <a href="#ref-for-propdef-wrap-through⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-wrap-through-none">
   <b><a href="#valdef-wrap-through-none">#valdef-wrap-through-none</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-wrap-through-none">3.3. 
Propagation of Exclusions</a> <a href="#ref-for-valdef-wrap-through-none①">(2)</a>
   </ul>
  </aside>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>